import { withInstall } from '@ibiz-template/vue3-util';
import { registerGridColumnProvider } from '@ibiz-template/runtime';
import AttachmentViewerColumn from './attachment-viewer-column';
import { AttachmentViewerColumnProvider } from './attachment-viewer-column.provider';

export const IBizAttachmentViewerColumn = withInstall(
  AttachmentViewerColumn,
  v => {
    v.component(AttachmentViewerColumn.name!, AttachmentViewerColumn);
    registerGridColumnProvider(
      'GRID_COLRENDER_ATTACHMENT_VIEWER_COLUMN',
      () => new AttachmentViewerColumnProvider(),
    );
  },
);
